//
//  CustomView.m
//  01-UIViewHomeWork
//
//  Created by 岁变 on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "CustomView.h"

@implementation CustomView

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        [self config];
    }
    return self;
}


- (void)config {
    
    self.IM_user = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_username"]];
    self.IM_user.frame = CGRectMake(0, 0, 50, self.frame.size.height / 2 - 1);
    self.IM_user.backgroundColor = [UIColor blackColor];
    [self addSubview:_IM_user];
    
    self.TE_user = [[UITextField alloc] initWithFrame:CGRectMake(50, 0, self.frame.size.width - 50, self.frame.size.height / 2 - 1)];
    self.TE_user.backgroundColor = [UIColor blackColor];
    self.TE_user.alpha = 0.4;
    [self addSubview:_TE_user];
    
    self.IM_password = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_password"]];
    self.IM_password.frame = CGRectMake(0, self.frame.size.height / 2 + 1, 50, self.frame.size.height / 2 - 1);
    self.IM_password.backgroundColor = [UIColor blackColor];
    [self addSubview:_IM_password];
    
    self.TE_password = [[UITextField alloc] initWithFrame:CGRectMake(50, self.frame.size.height / 2 + 1,  self.frame.size.width - 50, self.frame.size.height / 2 - 1)];
    self.TE_password.backgroundColor = [UIColor blackColor];
    self.TE_password.alpha = 0.4;
    [self addSubview:_TE_password];
    
}


@end
